Increase the default size of hash tables to 512 entries.
authorØyvind Kolås <pippin@gimp.org>
Sun, 22 Nov 2009 17:10:39 +0000 (17:10 +0000)
committerØyvind Kolås <pippin@gimp.org>
Sun, 22 Nov 2009 17:10:39 +0000 (17:10 +0000)
This avoids resizing of the hash tables for all typical usage scenarios
and thus avoids a potential race condition in unlocked lookups.

babl/babl-hash-table.c

index a3f83647bebcca811bff445c8a46a60fc6d7dd24..8afc3aa4316718e8b9f9cc2d26e41ef22519adb5 100644 (file)
@@ -23,7 +23,7 @@
 #include "config.h"
 #include "babl-internal.h"
 
-#define BABL_HASH_TABLE_INITIAL_MASK   0x7F
+#define BABL_HASH_TABLE_INITIAL_MASK   0x1FF  /* 511 */
 
 /* static functions declarations */
 static inline int